/* eslint-disable object-curly-newline */
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

const path = require('path');

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      '@scss': path.resolve(__dirname, './src/assets/scss')
    }
  },
  base: './',
  plugins: [vue()],
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: '@import "@/assets/scss/element-variables.scss";'
      }
    }
  },
  server: {
    port: 3000,
    proxy: {
      'api': '192.168.3.123',
      changeOrigin: {
        rewrite: path => path.replace(/\/api/, '')
      }
    }
  }
});
